package com.ricky.web.table;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author Ricky
 * @date 2020/11/30
 */
@Data
@ApiModel("服务器")
@DatabaseTable(tableName = "server_list")
public class Server {
    @DatabaseField(id = true)
    @ApiModelProperty(value = "服务器id")
    private String id;
    @DatabaseField
    @ApiModelProperty(value = "服务器名称")
    private String name;
    @DatabaseField
    @ApiModelProperty(value = "服务器地址")
    private String host;
    @DatabaseField(defaultValue = "22")
    @ApiModelProperty(value = "服务器端口")
    private int port = 22;
    @DatabaseField
    @ApiModelProperty(value = "服务器用户名称")
    private String username = "root";
    @DatabaseField
    @ApiModelProperty(value = "服务器用户密码")
    private String password;

    //    @ForeignCollectionField(eager = true) // 必须
    //    private ForeignCollection<Service> services;
}
